package com.woniu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Getter
@Setter
@ToString

@TableName("project")
public class Project implements Serializable{
    @TableId(value = "pro_id", type = IdType.AUTO)
    private Integer proId;
    @TableField(value = "bank_id", property = "bank.bankId")
    private Bank bank;


//    @TableField(value = "spen_id",  property = "proSpence.spenId",exist = false)
//    private ProSpence proSpence;//流水
//
//    @TableField(value = "pur_id",  property = "proPurchase.purId",exist = false)
//    private ProPurchase proPurchase;//采购
//
//    @TableField(value = "approve_id",  property = "proApprove.approveId",exist = false)
//    private ProApprove proApprove;//审批

    @TableField(value = "user_id",  property = "user.userId")
    private  User user;

    @TableField(exist = false)
    private  List<User> users;
    @TableField(exist = false)
    private  List<ProApprove> proApproves;//审批
    @TableField(exist = false)
    private  List<ProPurchase> proPurchases;//采购
    @TableField(exist = false)
    private  List<ProSpence> proSpences;//流水


    private String proName;

    private String contract;

    private String proStartTime;

    private String proEndTime;

    private BigDecimal prePrice;

//    private BigDecimal leftPrice;

    private String proStatus;//r-->审批中；y-->已通过审批，项目执行中；n-->未通过审批；e-->项目结束

    @TableField(exist = false)
    private String StartTime;
    @TableField(exist = false)
    private String EndTime;
    @TableField(exist = false)
    private BigDecimal minPrePrice;
    @TableField(exist = false)
    private BigDecimal maxPrePrice;
//    @TableField(exist = false)
//    private BigDecimal minLeftPrice;//快用完了，用于提醒，10%
//    @TableField(exist = false)
//    private BigDecimal maxLeftPrice;//剩余太多钱，项目不合格，30%
}
